#if !defined(AFX_KWCLIENTCTL_H__B13E9116_0C60_4229_AA96_E410FD587B55__INCLUDED_)
#define AFX_KWCLIENTCTL_H__B13E9116_0C60_4229_AA96_E410FD587B55__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// KWClientCtl.h : Declaration of the CKWClientCtrl ActiveX Control class.

class CLoginDlg;

/////////////////////////////////////////////////////////////////////////////
// CKWClientCtrl : See KWClientCtl.cpp for implementation.

class CKWClientCtrl : public COleControl
{
	DECLARE_DYNCREATE(CKWClientCtrl)

// Constructor
public:
	CKWClientCtrl();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CKWClientCtrl)
	public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	//}}AFX_VIRTUAL

// Implementation
protected:
	void DestroyMainPanel();
	void CreateMainPanel();
	~CKWClientCtrl();

	DECLARE_OLECREATE_EX(CKWClientCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CKWClientCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CKWClientCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CKWClientCtrl)		// Type name and misc status

// Message maps
	//{{AFX_MSG(CKWClientCtrl)
  afx_msg LRESULT OnAppDestroyMainPanel(WPARAM wParam, LPARAM lParam);
  afx_msg LRESULT OnAppCreateMainPanel(WPARAM wParam, LPARAM lParam);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnDestroy();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CKWClientCtrl)
	afx_msg long Login(LPCTSTR strServerIPAddress, long nPort, long nNetworkMode, LPCTSTR strUserName, LPCTSTR strPassword);
	afx_msg long OpenCoalMinePanel(long nCoalMineId, long nSurfaceIndex);
	afx_msg long ButtonClicked(long nButtonId);
	afx_msg long OpenAlarmDataPanel();
	afx_msg long AddUserDefinedDisplay(LPCTSTR strDisplayName, long nShareFlag);
	afx_msg long DeleteUserDefinedDisplay(LPCTSTR strUserId, LPCTSTR strDisplayName);
	afx_msg long RenameUserDefinedDisplay(LPCTSTR strUserId, LPCTSTR strOldDisplayName, LPCTSTR strNewDisplayName);
	afx_msg long OpenUserDefinedDisplayPanel(LPCTSTR strUserId, LPCTSTR strDisplayName);
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	//{{AFX_EVENT(CKWClientCtrl)
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	enum {
	//{{AFX_DISP_ID(CKWClientCtrl)
	dispidLogin = 1L,
	dispidOpenCoalMinePanel = 2L,
	dispidButtonClicked = 3L,
	dispidOpenAlarmDataPanel = 4L,
	dispidAddUserDefinedDisplay = 5L,
	dispidDeleteUserDefinedDisplay = 6L,
	dispidRenameUserDefinedDisplay = 7L,
	dispidOpenUserDefinedDisplayPanel = 8L,
	//}}AFX_DISP_ID
	};

private:
	CLoginDlg * m_pLoginDlg;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_KWCLIENTCTL_H__B13E9116_0C60_4229_AA96_E410FD587B55__INCLUDED)
